package org.cytoscape.myapp.cytoscape_app_v1.internal.model.attributes;

import org.cytoscape.model.CyNetwork;
import org.cytoscape.model.CyNode;

public class Attribute {
	
	protected Class<?> typeClass;
	protected String name;
	
	public Attribute(Class<?> typeClass, String name) {
		super();
		this.typeClass = typeClass;
		this.name = name;
	}
	
	public Class<?> getTypeClass() {
		return typeClass;
	}
	public void setTypeClass(Class<?> typeClass) {
		this.typeClass = typeClass;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public Object getValuesCyNode(CyNetwork cyNetwork, CyNode node){
		return cyNetwork.getDefaultNodeTable().getRow(node.getSUID()).get(this.name, this.typeClass);
	}
	

	
	
}
